<template>
  <div class="routeBg" v-if="isShowShareOverTime">
    <div class="routeBgOpacity"></div>
    <div class="routeBgDiv">
      <div class="routeBgDivIntro">
        <div class="routeBgDivImg"><img src="/static/images/share1/shareOuttime.png"></div>
        <div class="routeBgDivTxt">
          <p>
            分享已超时<br/>即将跳转至首页
          </p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    props:{
      isShowShareOverTime:{
        type: Boolean,
      }
    },
    watch:{
      isShowShareOverTime(val){
        if(val){
          setTimeout(()=>{
            const url = '../index/main';
            wx.switchTab({ url })
          },3000)
        }
      }
    }
  }
</script>
<style scoped>
.routeBg {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  z-index: 10; 
}
.routeBg .routeBgOpacity{
  width: 100%;
  height: 100%;
  background: black;
  opacity: 0.6;
}
.routeBg .routeBgDiv{
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  z-index: 12;
}
 .routeBg .routeBgDiv .routeBgDivIntro{
  position: relative;
  width: 357rpx;
  height: 380rpx;
  top: 50%;
  left: 50%;
  margin-left: -150rpx;
  margin-top: -190rpx;
}
.routeBg .routeBgDiv .routeBgDivIntro .routeBgDivImg{
  width: 357rpx;
  height: 380rpx;
}
.routeBg .routeBgDiv .routeBgDivIntro .routeBgDivImg img{
  width: 100%;
  height: 100%;
}
.routeBg .routeBgDiv .routeBgDivIntro .routeBgDivTxt{
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.routeBg .routeBgDiv .routeBgDivIntro .routeBgDivTxt p{
  text-align: center;
  font-size: 28rpx;
  line-height: 50rpx;
  color: #c17713;
  padding: 0 22rpx 0 17rpx;
}
</style>
